const p = require('path');
// const withBundleAnalyzer = require('@next/bundle-analyzer')({
//     enabled: process.env.ANALYZE === 'true'
// });

const config = {
    distDir: 'build',
eslint: {
        ignoreDuringBuilds: true,
    },
    typescript: {
        ignoreBuildErrors: true,
    },
    future: {
        webpack5: true,
    },
    webpack: function (config) {
        return {
            ...config,
            resolve: {
                ...config.resolve,
                alias: {
                    ...config.resolve.alias,
                    'bn.js': p.join(__dirname, 'node_modules/bn.js/lib/bn.js'),
                },
            },
        };
    },
};

// module.exports = withBundleAnalyzer(config);
module.exports = config;
